import hashlib
class node(object):
    name = ''
    label = ''
    isFile = True
    subNodes = []
    def __init__(self):
        self.name = ''
        self.label = ''
        self.isFile = True

    def __del__(self):
        self.name = ''
        self.label = ''

    def toGraph(self):
        has = hashlib.md5()

        l = [];

        l.append("\tsubgraph cluster%s {" % (has.hexdigest()))
        l.append("\t\tlabel = \"%s\";" % (self.name))
        l.append("\t\tcolor = blue;")

        for node in self.subNodes:
            l.append(node.toGraph());
        l.append("\t}")
        print('\n'.join(l))
        return '\n'.join(l)

